#ifndef PROCESS_H
#define PROCESS_H
#include "thread.h"

class Process {
 public:

  Process(AddrSpace* mem);//constructor
  
  void setID (int newID);//function to set a new id for a process

  int addThread (Thread* t);//add a thread into the process

  int getNumThreads(){return numThreads;}//accessor to the number of threads
  void removeThread(Thread* t);

  void deallocateSpace(AddrSpace* s);

  AddrSpace* getSpace() {return space;}

 private:
  int pID;//thead id
  int numThreads;//number of threads in process
  Thread* threadArray[50];//array of threads
  AddrSpace *space;//the addrspace
};
#endif
